home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
cmln1285.arc
/
PARSER1.LTG
< prev
next >
Wrap
Text File
|
1986-02-27
|
1KB
|
41 lines
Listing 1
Prolog Subset Phrase Grammar
Start ááááá-> Prolog
Prolog áááá-> Prolog Clause
-> Clause
Clause áááá-> Goals '.'
-> Goals ':-' Goals '.'
Goals ááááá-> Goals ',' Goal
-> Goal
Goal áááááá-> Predicate '(' Components ')'
Components -> Components ',' Component
-> Component
Component á-> Functor '(' Components ')'
-> '<VARIABLE>'
-> Constant
-> List
Constant áá-> '<NUMBER>'
-> '<ATOM>'
Functor ááá-> '<ATOM>'
Predicate á-> '<ATOM>'è
áááááááááList áááááá-> '[' ']'
-> '[' Head ']'
-> '[' Head '|' Tail ']'
Head áááááá-> Components
Tail áááááá-> List